package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.CommentEvaluation;
import cn.bgs.service.CommentEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 留言评价表 前端控制器
 * </p>
 *
 * @author Mr.Zhao
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/comment-evaluation")
public class CommentEvaluationController {

    @Autowired
    private CommentEvaluationService commentEvaluationService;

    @GetMapping("/findCommentEvaluation")
    public R findCommentEvaluation(@RequestParam String comEvaTitle,@RequestParam String comEvaFrom){
        return commentEvaluationService.findCommentEvaluation(comEvaTitle, comEvaFrom);
    }

    @GetMapping("/findCommentEvaluationId")
    public R findCommentEvaluationId(@RequestParam Integer id){
        return commentEvaluationService.findCommentEvaluationId(id);
    }

    @GetMapping("delCommentEvaluation")
    public R delCommentEvaluation(@RequestParam Integer id){
        return commentEvaluationService.delfindCommentEvaluation(id);
    }
}

